<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "pay_accounts".
 *
 * @property int $id 主键
 * @property int $type 账号类型  1=银行卡   2=支付宝
 * @property string $account_number 账号
 * @property string $real_name 真实姓名
 * @property string $mobile 联系电话
 * @property string $alipay_img 支付宝图片
 * @property string $ctime
 * @property string $utime
 */
class PayAccounts extends \yii\db\ActiveRecord {
    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'pay_accounts';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['type'], 'integer'],
            [['mobile', 'alipay_img', 'ctime', 'utime'], 'required'],
            [['ctime', 'utime'], 'safe'],
            [['account_number', 'real_name'], 'string', 'max' => 50],
            [['mobile'], 'string', 'max' => 20],
            [['alipay_img'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'type' => 'Type',
            'account_number' => 'Account Number',
            'real_name' => 'Real Name',
            'mobile' => 'Mobile',
            'alipay_img' => 'Alipay Img',
            'ctime' => 'Ctime',
            'utime' => 'Utime',
        ];
    }
}
